-------------------------------------------
---- * from version 2.0.2 **-04-2009 -----
-------------------------------------------

---- Functions ----  
     Main()   
     OnTimer(Id)  
     OnExit()  
     NewUserConnected(User)   
     UserDisconnected(User)  
     OpConnected(User)  
     OpDisconnected(User)  
     SupportsArrival(User, Data)                    
     ChatArrival(User, Data)                          
     KeyArrival(User, Data)                    
     ValidateNickArrival(User, Data)              
     PasswordArrival(User, Data)                    
     VersionArrival(User, Data)                    
     GetNickListArrival(User, Data)              
     MyINFOArrival(User, Data)              
     SearchArrival(User, Data)                    
     ToArrival(User, Data)                          
     ConnectToMeArrival(User, Data)              
     OpForceMoveArrival(User, Data)        
     RevConnectToMeArrival(User, Data)              
     SRArrival(User, Data)  
     KickArrival(User, Data)
	 CommandArrival(User,Data)
	 ChatRoomArrival(User,Data)
*	 DataArrival(User,Data)
*	 WebArrival(Url,Parms,LuaData, IP)
	 
	 --Web info--
		-- Address in browser  	>>>	 http://www.rs2soft.nl/forum/index.php?action=collapse;c=1;sa=collapse;#c1
		-- Code in htlm		>>>	<head><?lua title ?></head>
		
		-- Url = forum/index.php
		-- Parms = action=collapse;c=1;sa=collapse;#c1
		-- LuaData = title
		-- IP = the connected IP
		
  
----User:----  
     SendData(FromNick, Data)              
     SendData(Data)                    
     SendPM(FromNick, Data)                    
     Disconnect()  
     Warn(WarnerNick,Reason)
	 Kick(KickerNick, Reason)              
     Kick(Reason)                          
     Ban()  
     Ban(sReason, sBy)  
     NickBan()  
     NickBan(sReason, sBy)  
     Kill(sReason, sBy)  
     TimeBan(iTime, sReason, sBy, bFull)          --iTime in minutes        
     Redirect(Address)                    
     Redirect(Address, Reason)
	 Mute(Reason)
  
---- User. ----  
     sName  
	 sPass
     sClient
	 sClientVersion
     sMode  
     sIP  
     sMyNFO
	 sStrippedMyINFO
	 sFlag
     bUserCommand  
     bOperator  
     bRegistered  
     bActive  
     iShareSize  
     cProfile  
     sProfileName   
     iProfileNumber  
     iHubs  
     iSlots  
     sDescription  
     sConnection  
     sEmail  
     iNormalHubs                          
     iRegHubs                          
     iOpHubs                                
     bConnected                          
     iLoginTime                          
     sConnectTime                    
     sCountryCode	> Get / Set 
	 iKicks 		> Get / Set
	 Iwarns			> Get / Set
	 bMuted			> Get / Set
	 bBlockDownload > Get / Set
	 bBlockSearch	> Get / Set

---- Profile. ----            -- User.iProfile  
     sProfileName  
     iProfileNumber  
     iMinShare            -- 0 B,   100 MB  
     iMaxShare            -- 1 GB, 15 TB  
     sMinShareBytes  
     sMaxShareBytes  
     sShareAction  
     sShareRedirect  
     iMinSlots  
     iMaxSlots  
     sSlotsAction  
     sSlotsRedirect  
     iMinHubs  
     iMaxHubs  
     sHubsAction  
     sHubsRedirect  
	 bOperator

  
---- Global ----  
--All  
     SendToAll(Data)  
     SendChatToAll(FromNick,Data)  
     SendPmToAll(FromNick, Data)  
--Profile  
     SendToProfile(ProfileNumber,Data)                                
     SendChatToProfile(ProfileNumber,FromNick,Data)  
     SendPmToProfile(ProfileNumber,FromNick, Data)  
--Nick  
     SendToNick(Nick,Data)  
     SendChatToNick(Nick,FromNick, Data)  
     SendPmToNick(Nick,FromNick, Data)  
--Ops  
     SendToOps(Data)  
     SendChatToOps(FromNick,Data)  
     SendPmToOps(FromNick,Data)  
--Mode  
     SendToMode(Mode,Data)      --Mode A, P, S  
     SendChatToMode(Mode,FromNick,Data)  
     SendPmToMode(Mode,FormNick, Data)

*	 SendKickMessage(Data)		--Send a message to the profiles that are checked in GUI to recive kick messages	 
       
     GetOnlineUsers(ProfileNumber) -1 for all users        
     GetOnlineOperators()                                
     GetOnlineNonOperators()                                
     GetUsersByProfile(ProfileName)                    
  
     returns table like this  
  
           [ 0 ] = ["sName"] = string  
                     ["sIp"] = string  
                     ["sDescription"] = string  
                     ["sConnection"] = string  
                     ["iUserHubs"] = Number  
                     ["iRegHubs"] = Number  
                     ["iOpHubs"] = Number  
                     ["sMyINFO"] = string  
                     ["sClient"] = string  
                     ["sConnectTime"] = string  
                     ["bIsOP"] = string (True or False)  
                     ["bIsReg"] = string (True or False)  
           ["cProfile"] = class (True or False)  
	 
	 GetUserSettings() 
 
	 Returns table 
	 
	 [ 0 ] = ["sProfileName"] = string   
			  ["iProfileNumber"] = Number 
			  ["iMinSlot"] = Number   
			  ["iMaxSlot"] = Number  
			  ["sSlotAction"] = string  
			  ["sSlotRedirect"] = String 
			  ["iMinHubs"] = Number   
			  ["iMaxHubs"] = Number  
			  ["sHubsAction"] = string  
			  ["sHubsRedirect"] = String 
			  ["iMinShare"] = Number   
			  ["iMaxShare"] = Number 
			  ["iMinShareBytes"] = Number   
			  ["iMaxShareBytes"] = Number 
			  ["sMinShareFormat"] = Number   
			  ["sMaxShareFormat"] = Number   
			  ["sShareAction"] = string   
			  ["sShareRedirect"] = string   
  
     GetBanList()  
  
     returns table like this  
  
           [ 0 ] = ["sExpireDate"] = string  
                     ["sBanData"] = string  
                     ["sReason"] = string  
                     ["sBy"] = string  
                     ["sType"] = string  
                     ["sNickIp"] = string  
                       
     GetRegisteredUsers()  
     GetNonOperators()  
     GetOperators()        
  
     returns table like this  
                   
           [ 0 ] = ["sName"] = string  
                     ["sIp"] = string  
                     ["sProfile"] = string  
                     ["sPass"] = string  
                     ["sLastLogin"] = string  
       
     GetUserByName(Nick)  

       
  
---- frmHub: ----  
     	GetHubBotName()  
     	GetHubAddress()  
*	GetHubTopic()
*	SetHubTopic()
*	GetHubShare
    	GetOpChatName() 
    	GetHubPort()            -- Main TCP port  
     	GetHubPorts()            -- All open TCP port  
*	GetWebPort()
*	GetWebStarted()		-- true if web is running
    	GetHubName()  
     	GetHubDescription()  
     	GetKickRedirect()  
 	GetKickRedirectAddress()  
     	GetBanRedirect()  
     	GetBanRedirectAddress()  
     	GetMainRedirect() Changed18-08-2008
	GetStartupPath()
	GetUserCount()
	GetStartTime()
	GetOnlineTime()
	GetHubOwner()

	 RegisterUser(Name, Pass, Profile) 		returns true,false
	 RegisterUser(Name, Pass, Profile, IP) 	returns true,flase
	 UnregisterUser(Name) 					returns true,false
	 ChangeUserPass(Name,Pass)				returns true,false
 	 ChangeUserIP(Name,Pass)				returns true,false
	 ChangeUserProfile(Name, ProfileName)	returns true,false

---- HubBot: -- 
     Reg(Bot) 
     Reg(Bot, MyINFO) 
     UnReg(Bot) 
      
---- Timer: ---- 
     NewTimer(Interval)                         returns -1 if error else the ID number 
     NewTimer(Interval, CallFunction) returns -1 if error else the ID number 
     Stop(Id) 
     Start(Id) 
     Close(Id)                               Close the timer and can not be used again. 
      
     -- Example Code -- 
     TimerID1 = -1 
     TimerID2 = -1 
     TimerID3 = -1 
      
     function Main() 
           TimerID1 = Timer:NewTimer(1000, MyFucntion) 
           TimerID2 = Timer:NewTimer(1000, MyFucntion) 
           TimerID3 = Timer:NewTimer(1000) -- Use default OnTimer event 
           Timer:Start(TimerID1) 
           Timer:Start(TimerID2) 
           Timer:Start(TimerID3) 
     end 
      
     function MyFunction(Id) 
           if TimerID1 == Id then 
                 -- Here is the TimerID1 event 
           end 
           if TimerID2 == Id then 
                 -- Here is the TimerID2 event 
           end 
            
     end 
      
     function OnTimer(Id) 
           -- Only TimerID3 comes here 
     end 
     -- End Example -- 

---- Mail ----
!! Is preloaded !!
	 .sFrom 
	 .sHost
	 .sPort
	 .sUser
	 .sPassword
	 :SendMail(ToMail,Subject,Body)		returns true,false

---- FTP ----
!! Is preloaded !!
	 :Set(Host,User,Pass,Port)
	 :Login
	 :Move(data)	-- Move to a folder step by step
	 :GetFiles()	-- Returns table with files and folders
	 :RemoveFile(file)
	 :UploadFile(file)
	 :MakeDir(DirName)
	 :RemoveDir(DirName)

---- Web ----
!! Is preloaded !!
	 :GetHtml(url)		returns html or EMPTY or ERROR
	 :ResolveDns		returns IP or ERROR

-------------------------------------------
---- * from version 2.0.2 **-04-2009 -----
-------------------------------------------
